package com.school.campus.service.impl;

import java.util.List;
import com.school.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.school.campus.mapper.ClubActivityTypeMapper;
import com.school.campus.domain.ClubActivityType;
import com.school.campus.service.IClubActivityTypeService;

/**
 * 社团活动类型Service业务层处理
 * 
 * @author wwj
 * @date 2025-11-06
 */
@Service
public class ClubActivityTypeServiceImpl implements IClubActivityTypeService 
{
    @Autowired
    private ClubActivityTypeMapper clubActivityTypeMapper;

    /**
     * 查询社团活动类型
     * 
     * @param id 社团活动类型主键
     * @return 社团活动类型
     */
    @Override
    public ClubActivityType selectClubActivityTypeById(String id)
    {
        return clubActivityTypeMapper.selectClubActivityTypeById(id);
    }

    /**
     * 查询社团活动类型列表
     * 
     * @param clubActivityType 社团活动类型
     * @return 社团活动类型
     */
    @Override
    public List<ClubActivityType> selectClubActivityTypeList(ClubActivityType clubActivityType)
    {
        return clubActivityTypeMapper.selectClubActivityTypeList(clubActivityType);
    }

    /**
     * 新增社团活动类型
     * 
     * @param clubActivityType 社团活动类型
     * @return 结果
     */
    @Override
    public int insertClubActivityType(ClubActivityType clubActivityType)
    {
        clubActivityType.setCreateTime(DateUtils.getNowDate());
        return clubActivityTypeMapper.insertClubActivityType(clubActivityType);
    }

    /**
     * 修改社团活动类型
     * 
     * @param clubActivityType 社团活动类型
     * @return 结果
     */
    @Override
    public int updateClubActivityType(ClubActivityType clubActivityType)
    {
        clubActivityType.setUpdateTime(DateUtils.getNowDate());
        return clubActivityTypeMapper.updateClubActivityType(clubActivityType);
    }

    /**
     * 批量删除社团活动类型
     * 
     * @param ids 需要删除的社团活动类型主键
     * @return 结果
     */
    @Override
    public int deleteClubActivityTypeByIds(String[] ids)
    {
        return clubActivityTypeMapper.deleteClubActivityTypeByIds(ids);
    }

    /**
     * 删除社团活动类型信息
     * 
     * @param id 社团活动类型主键
     * @return 结果
     */
    @Override
    public int deleteClubActivityTypeById(String id)
    {
        return clubActivityTypeMapper.deleteClubActivityTypeById(id);
    }
}
